package com.MedDroid.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.MedDroid.MainApp;

/**
 * Created with IntelliJ IDEA.
 * User: Romen
 * Date: 28/11/13
 * Time: 2:36 PM
 * Description: The main class of the application. Starts here.
 */
public class MainActivity extends Activity
{
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);

	}

	@Override
	protected void onResume()
	{
		super.onResume();
		Intent intent = new Intent(this, LoginActivity.class);
		intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		startActivity(intent); // Starts the login Activity;
		finish();
	}

	@Override
	protected void onStop()
	{
		super.onStop();
		((MainApp)getApplication()).onStop();
	}

	@Override
	protected  void onDestroy()
	{
		super.onDestroy();
		((MainApp)getApplication()).onStop();
	}
}